﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp8
{
    class SortByAge:Comparer<Student>
    {
        //重写方法来作比较 比较的是Age
        public override int Compare(Student a,Student b)
        {
            return a.Age.CompareTo(b.Age);
        }
    }
}
